<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>SEPHORA丝芙兰官网-国际化妆品购物网站！ sephora.cn</title>
    <link rel="stylesheet" href="./index.css">
    <link rel="stylesheet" href="./css/公共头尾部.css">
</head>

<body>
  <header>
      <ul class="topul">
          <a href="javascript:void(0)"><li>欢迎来到丝芙兰</li></a>
          <a href="javascript:void(0)" class="zz"><li> 请登录</li></a>
          <a href="javascript:void(0)"><li> 免费注册</li></a>
          <a href=""><li> 手机验证码登录</li></a>
          <a href="" class="aa"><li> 常见问题</li></a>
          <a href="" class="a1"><img src="./img/t1.png" alt="">&nbsp;<li> 我的丝芙兰</li></a>
          <a href="" class="a1"><img src="https://ssl1.sephorastatic.cn/soa/pc/images/vip-club.png" alt="">&nbsp;<li> 会员俱乐部</li></a>
          <a href="" class="a1"><img src="https://ssl1.sephorastatic.cn/soa/pc/images/mobile-sephora.png" alt="">&nbsp;<li> 手机丝芙兰</li></a>
          <a href=""><li> 帮助中心</li></a>
          <a href=""><li> 品牌合作</li></a>
      </ul>
  </header>

  <section>
      <a href="http://localhost:65535/sifulan.html"><h2> SEPHORA</h2></a>

      <div class="box1">
          <input type="text" name="" id="text" placeholder="轻熟肌抗氧精华">
          <ul class="search_result_list">
      
          </ul>
          <input type="submit" value="搜索"id="text1" >
          <ul id="pvp">
              <li><a href="">丝芙兰品牌大牌周</a></li>
              <li><a href="">养肤补水面膜</a></li>
              <li><a href="">轻熟肌抗氧精华</a></li>
              <li><a href="">防晒隔离必备</a></li>
              <li><a href="">畅销底妆合辑</a></li>
              <li><a href="">清爽元气香氛</a></li>
              <li><a href="">个护好物盘点</a></li>
          </ul>
      </div>
      <div class="box2">
          <a href="http://localhost:65535/www/gwc.html"><img src="./img/t2.png" alt=""><p>购物车<em>0</em>件</p></a>
      </div>
  </section>


  <div id="nav-list"><img src="" alt=""></div>
  <div id="content">
    <div class="box">
        <div class="showBox">
            <div class="middleBox">
                <img src="https://ssl3.sephorastatic.cn/products/V/S/1/0/3/6/6/9/9/1_n_14937_640x640.jpg"  alt="">
                <span></span>
                <em></em>
            </div>
            <div class="list">
                <div class="listImg">
                    <img class="active" src="https://ssl3.sephorastatic.cn/products/V/S/1/0/3/6/6/9/9/1_n_14937_50x50.jpg" alt="">
                    <img src="https://ssl1.sephorastatic.cn/products/V/S/1/0/3/6/6/9/9/2_n_14937_50x50.jpg" alt="">
                </div>
                <span class="left">&lt;</span>
                <span class="right">&gt;</span>
            </div>
        </div>
        <div class="bigBox">
            <img src="https://ssl3.sephorastatic.cn/products/V/S/1/0/3/6/6/9/9/1_n_14937_640x640.jpg" alt="">
        </div>
    </div>
    <div class="msg">
      <div class="top">
        <h3>娇兰帝皇蜂姿双效焕新修护紧塑精华露</h3>
        <p>AB/ROY 22 SER DR PUMP BTL</p>
        <img src="https://ssl3.sephorastatic.cn/wcsfrontend/brand/guerlain/guerlain_144X60.png" alt="">
      </div>
      <div class="center">
        <span class="one">价格</span>
        <span class="two">￥1830.00</span>
        <span class="three">价值:￥2935.00优惠折扣:37%</span>
        <span class="four">新品</span>
        <span class="five">活动</span>
        <div id="activity">
          <span class="span span1">赠</span>
          <p id="p1">赠丝家随行充气沙发！2022.9.22-9.28在官网*消费，单笔实付满899元，即可获赠丝家随行充气沙发一只（黑色或白色随机，共限量1000个,数量有限，赠完即止，详情请以购物车结算页面为准）*前1,000名单笔实付满899元，可同时丝家细密感草编遮阳帽*1，礼赠数量有限，以实际收到为准。*官网指：丝芙兰官网、APP及小程序</p>
          <span class="span span2">赠</span>
          <p id="p2">赠丝家细密感草编遮阳帽！2022.9.22-9.28在官网*消费，单笔实付满599元，即可获赠丝家细密感草编遮阳帽一个（共限量6000个,数量有限，赠完即止，详情请以购物车结算页面为准）*官网指：丝芙兰官网、APP及小程序</p>
          <span class="span span3">赠</span>
          <p id="p3">赠奥杰尼赋活胶原蛋白凝露1ml*3！2022/9/26至2022/10/31在丝芙兰官方/小程序购买任意产品实付金额满599元，即可获得奥杰尼赋活胶原蛋白凝露1ml*3，限量3000份，赠完即止。</p>
        </div>
        <div id="list">
          <span class="list1">促销详情
            <img src="https://ssl1.sephorastatic.cn/soa/pc/images/category_down_arrow_n.png" alt="">
          </span>
          <span class="list2">促销详情
            <img src="https://ssl1.sephorastatic.cn/soa/pc/images/category_down_arrow_n.png" alt="">
          </span>
          <span class="list3">促销详情
            <img src="https://ssl1.sephorastatic.cn/soa/pc/images/category_down_arrow_n.png" alt="">
          </span>
          <div class="list-details">
            <span id="span">赠</span>
            <p id="p"></p>
            <img src="" alt="" id="img">
            <span class="num">✖1</span>
          </div>
        </div>
      </div>
      <div class="bottom">
        <span class="six">规格</span>
        <div class="spanBox">
          <span class="n">50ml套装B</span>
          <span class="n">50ml</span>
          <span class="n">30ml</span>
          <span class="n">30ml套装A</span>
          <span class="n">30ml套装B</span>
        </div>
        <div id="numBox">
            <span class="number">1</span>
            <span class="btn1"><img src="https://ssl1.sephorastatic.cn/soa/pc/images/category_up_arrow_b.png" alt=""></span>
            <span class="btn2"><img src="https://ssl1.sephorastatic.cn/soa/pc/images/category_down_arrow_n.png" alt=""></span>
        </div>
       <span class="text">(每人限购五件)</span>
       <div class="shopcar">加入购物车<img src="https://ssl1.sephorastatic.cn/soa/pc/images/shopping_bag.png" alt=""></div>
      </div>
    </div>
    <div id="details">
      <div class="navlist">
        <div class="left">
          <span>热卖</span>
        </div>
        <div class="right">
          <ul>
            <li>基本信息</li>
            <li>所有评论</li>
            <li>产品咨询</li>
            <li>标签信息</li>
            <li>配送信息</li>
          </ul>
          <div id="introduce">
            <div class="message">
              <div>
                <span>适用人群：通用</span>
                <span>质地：乳状</span>
              </div>
              <div>
                <span>适用部位：面部</span>
                <span>规格: 50ml套装B</span>
              </div>
              <div>
                <span>功效: 提拉紧致</span>
                <span>货号: VS1036699</span>
              </div>
              <div id="lastdiv">
                <span id="lastspan">适合肤质: 中性/干燥缺水/混合性/油性/干性
                </span>
              </div>
            </div>
            <div id="box1">
              <p>套装详情</p>
              <div id="zhupin">
                <span>主品</span>
                <div id="box2">
                  <div class="l">
                    <img src="https://ssl4.sephorastatic.cn/products/6/2/0/3/9/4/1_n_14332_150x150.jpg" alt="">
                  </div>
                  <div class="r">
                    <span class="r1">GUERLAIN</span>
                    <p>娇兰帝皇蜂姿双效焕新修护紧塑精华露</p>
                    <span class="r2">￥1830.00</span>
                  </div>
                </div>
              </div>
              <div id="zengpin">
                <span>赠品</span>
                <div id="box3">
                  <div><img src="https://ssl2.sephorastatic.cn/products/5/5/7/4/4/5/1_n_11463_150x150.jpg" alt=""><p class="p1">法国娇兰帝皇蜂姿修护  复...</p><p class="p2">✖5</p>
                  </div>
                  <div><img src="https://ssl3.sephorastatic.cn/products/5/1/9/6/9/2/1_n_09165_150x150.jpg" alt="">
                    <p class="p1">娇兰帝皇蜂姿蜜润修护 精...</p><p class="p2">✖2</p></div>
                  <div><img src="https://ssl4.sephorastatic.cn/products/5/1/9/6/9/3/1_n_13004_150x150.jpg" alt="">
                    <p class="p1">娇兰帝皇蜂姿蜜润修护 精 ...</p><p class="p2">✖2</p></div>
                </div>
              </div>
              <div id="chandi">
                <p><img src="https://ssl1.sephorastatic.cn/soa/pc/images/footer_line.png" alt=""> 产地</p>
                <span>法国</span>
              </div>
            </div>
            <div id="cpmessage">
              <img src="https://ssl1.sephorastatic.cn/html/products/OP999436/images/0823/OP999436_01.jpg" alt="" class="img1">
              <div class="move"><img src="https://3-img.bokecc.com/comimage/DB5E63A2AD1D502A/2022-08-23/D9C04574A579FD9F753C612EB38A8D5A-1.jpg" alt="" class="img2">
              <img src="https://p.bokecc.com/images/html5player/skin2/svg/ccH5PlayBtn.svg" alt="" class="img3"></div>
              <img src="https://ssl1.sephorastatic.cn/html/products/OP999436/images/0823/OP999436_04.jpg" alt="" class="img4">
              <img src="https://ssl1.sephorastatic.cn/html/products/OP999436/images/0823/OP999436_05.jpg" alt="" class="img5">
              <img src="https://ssl1.sephorastatic.cn/html/products/OP999436/images/0823/OP999436_06.jpg" alt="" class="img6">
              <img src="https://ssl1.sephorastatic.cn/html/products/OP999436/images/0823/OP999436_07.jpg" alt="" class="img7">
              <img src="https://ssl1.sephorastatic.cn/html/products/OP999436/images/0823/OP999436_08.jpg" alt="" class="img8">
              <div class="move2"><img src="https://2-img.bokecc.com/comimage/DB5E63A2AD1D502A/2022-08-23/D9C04574A579FD9F2BBA984E86119800-1.jpg" alt="" class="img9"><img src="https://p.bokecc.com/images/html5player/skin2/svg/ccH5PlayBtn.svg" alt="" class="img9-1"></div>
              <img src="https://ssl1.sephorastatic.cn/html/products/OP999436/images/0823/OP999436_10.jpg" alt="" class="img10">
              <img src="https://ssl1.sephorastatic.cn/html/products/OP999436/images/0823/OP999436_11.jpg" alt="" class="img11">
              <img src="https://ssl1.sephorastatic.cn/html/products/OP999436/images/0823/OP999436_12.jpg" alt="" class="img12">
              <img src="https://ssl1.sephorastatic.cn/html/products/OP999436/images/0823/OP999436_13.jpg" alt="" class="img13">
            </div>
            <div id="box4">
              <div class="comment">
                <p class="p1">商品评论</p>
                <p class="p2">COMMENTS</p>
              </div>
              <div class="inquiry">
                <p>产品咨询</p>
                <span>Q&A</span>
                <span><img src="" alt="">有疑问，来发布第一个问题吧~</span>
                <span>我要咨询</span>
              </div>
              <div class="label">
                <p>产品标签信息</p>
                <span>COMMON INFORMATION</span>
                <span>我要查看</span>
              </div>
              <div class="pay">
                <p>支付及配送</p>
                <span>PAYMENT&SHIPPING</span>
                <h5>选择支付方式</h5>
                <p class="p">目前我们提供以下1种支付方式</p>
                <p class="p">1. 在线支付</p>
                <p class="p p3">支持支付宝、微信、及目前市场所有主流银行卡的在线支付。请在确认订单后选择相应支付界面进行支付。
                </p>
              </div>
              <div class="pricemsg">
                <p>价格声明</p>
                <span>PRICE STATEMENT</span>
                <p class="p">PRICE STATEMENT
                  本平台标注的其他价格信息，如划线价、专柜价、建议零售价、价值等，为仅供消费者参考的市场价格信息，来源为有关商品实体店的柜台售价、品牌方建议零售价或者根据有关商品正装产品售价和容量推算的价值等，便于您了解市场行情和价格变动。但是，由于地区、时间和行情波动因素，这些价格的实际情况可能与本店标注的其他价格信息有所不同。商品的最终售价以订单结算页展示销售价格为准，秒杀价，换购价等特殊活动价不再参与其他优惠，请在下单前仔细确认；如您发现商品价格或其他促销信息有异常，建议购买前联系客服人员咨询。</p>
              </div>
              <div class="return">
                <p>退换货规定</p>
                <span>RETURN PROVISIONS</span>
                <p class="p">1. 我们不接受包装盒已被开封的商品的退换货（商品外包装盒上的透明封装胶纸已被撕开同样视为开封），请您谅解！<br>
                  2. 所有未开封的商品如需退换请于签收日算起14日内办理，退货收到并确认无误后于一周内办理退款。<br>
                  3. 如您需整单退换，请您务必将当次订单中所有商品（包括免费赠品、包装礼盒）全部退回。<br>
                  4. 因顾客自身原因造成退换货时，由顾客承担商品退回时的邮资和再次发送时的运费。<br>
                  5. 如该商品曾被积分，退货后，该笔金额产生的积分将被从积分数中扣除。<br>
                  6. 如您希望调换其它等价商品，请您先为需要退回的订单办理退货，我们收到退货并确认无误后，将为您发送新的商品。若您希望调换的为非等价商品，请您先为您的订单办理退货及退款，然后至网站另行订购您喜欢的其它商品，我们将另行发送。<br>
                  7. 如您在使用了于丝芙兰网站购买的产品后出现过敏症状，在提供相关医院出具的有效证明后，我们将接受此产品的退货。</p>
              </div>
              <div class="tip">
                <h5>消费提醒</h5>
                <p>国家药监局提示您：请正确认识化妆品功效，化妆品不能替代药品，不能治疗皮肤病等疾病。<br>
                  国家药监局提示您：宣称用于祛斑美白、防晒、染发、烫发等的化妆品为特殊用途化妆品，产品标签上应标注‘国妆特字’或者‘国妆特进字’的批准文号。</p>
              </div>
            </div>
            
          </div>
        </div>
        <div id="foot-img">
          <div class="imgbox">
            <div class="box"><img src="./img copy/1.png" alt=""><h5>顺丰EMS速达</h5></div>
            <div class="box"><img src="./img copy/2.png" alt=""><h5>丰富礼赠</h5></div>
            <div class="box"><img src="./img copy/3.png" alt=""><h5>100%正品</h5></div>
            <div class="box"><img src="./img copy/4.png" alt=""><h5>无障碍退款</h5></div>
            <div class="box"><img src="./img copy/5.png" alt=""><h5>安全支付</h5></div>
          </div>
        </div> 
        <div id="footer">
          <div>
            <h5>购物流程</h5>
            <p>大宗采购/团购</p>
            <p>丝芙兰预付卡章程</p>
          </div>
          <div>
            <h5>支付/配送</h5>
            <p>在线支付</p>
            <p>配送时间</p>
          </div>
          <div>
            <h5>售后服务</h5>
            <p>大退换货规定</p>
            <p>退货及退款说明</p>
          </div>
          <div>
            <h5>关于丝芙兰</h5>
            <p>联系我们</p>
            <p>品牌合作/Brand Collaboration</p>
            <p>隐私政策</p>
          </div>
          <div>
            <h5>网上订购咨询热线：400 670 0055</h5>
          </div>
          <div><img src="https://ssl1.sephorastatic.cn/soa/pc/images/footer_line.png" alt=""></div>
        </div>
      </div>
    </div>
    
    <div class="shoplist">

      <div class="box">
        <div class="img"><img src="https://ssl3.sephorastatic.cn/products/V/S/1/0/3/7/4/8/6/1_n_15155_180x180.jpg" alt=""></div>
        <span class="h3">ERNO LASZLO</span>
        <span class="p">奥伦纳素滋润保湿护肤水（清爽保湿水温和舒缓）</span>
        <span class="price">￥510.00</span>
      </div>
      <div class="box">
        <div class="img"><img src="https://ssl3.sephorastatic.cn/products/6/1/3/8/9/7/1_n_15081_180x180.jpg" alt=""></div>
        <span class="h3">SEPHORACOLLECTION</span>
        <span class="p">丝芙兰紫苏籽精华水</span>
        <span class="price">￥189.00</span>
      </div>
      <div class="box">
        <div class="img"><img src="https://ssl1.sephorastatic.cn/products/V/S/1/0/3/7/0/4/4/1_n_15115_180x180.jpg" alt="" class="img_1"></div>
        <span class="h3">LABSERIES</span>
        <span class="p">朗仕保湿焕能爽肤水</span>
        <span class="price">￥275.00</span>
      <div>                                    <div class="box">
        <div class="img"><img src="https://ssl1.sephorastatic.cn/products/V/S/1/0/2/7/4/4/8/1_n_14038_180x180.jpg" alt="" class="img_2"></div>
        <span class="h3">M.A.C</span>
        <span class="p">朗魅可时尚焦点小眼影</span>
        <span class="price">￥165.00</span>
      <div>                                    <div class="box">
        <div class="img"><img src="https://ssl3.sephorastatic.cn/products/5/6/5/2/5/3/1_n_15081_180x180.jpg" alt="" class="img_3"></div>
        <span class="h3">SEPHORACOLLECTION</span>
        <span class="p">朗丝芙兰舒和乐活柔润身体乳</span>
        <span class="price">￥159.00</span>
      <div>
      <div class="box">
        <div class="img"><img src="https://ssl4.sephorastatic.cn/products/5/8/4/4/6/5/1_n_14429_180x180.jpg" alt=""></div>
        <span class="h3">GIVENCHY</span>
        <span class="p">纪梵希光彩水漾双重眼唇卸妆液</span>
        <span class="price">￥310.00</span>
      </div>   
      <div class="box">
        <div class="img"><img src="https://ssl4.sephorastatic.cn/products/V/S/1/0/3/4/4/0/5/1_n_14538_180x180.jpg" alt=""></div>
        <span class="h3">M.A.C</span>
        <span class="p">魅可清爽舒肤净妆油</span>
        <span class="price">￥260.00</span>
      </div>
      <div class="box">
        <div class="img"><img src="https://ssl3.sephorastatic.cn/products/V/S/1/0/2/0/7/7/0/1_n_15109_180x180.jpg" alt=""></div>
        <span class="h3">SHUUEMURA</span>
        <span class="p">植村秀新琥珀臻萃洁颜油</span>
        <span class="price">￥260.00</span>
      </div>  
      <div class="box">
        <div class="img"><img src="https://ssl1.sephorastatic.cn/products/V/S/1/0/3/7/0/5/9/1_n_15121_180x180.jpg" alt=""></div>
        <span class="h3">SHISEIDO</span>
        <span class="p">资生堂悦薇珀翡水乳优惠套组</span>
        <span class="price">￥760.00</span>
      </div>  
      <div class="box">
        <div class="img"><img src="https://ssl1.sephorastatic.cn/products/V/S/1/0/3/6/4/3/4/1_n_14791_180x180.jpg" alt=""></div>
        <span class="h3">GIVENCHY</span>
        <span class="p">纪梵希明星四宫格散粉</span>
        <span class="price">￥570.00</span>
      <div>                         
    </div>
    
  </div>
  
 
<script>
    const list1 = document.querySelector(".list1");
  const list2 = document.querySelector(".list2");
  const list3 = document.querySelector(".list3");
  const p1 = document.querySelector("#p1");
  const p2 = document.querySelector("#p2");
  const p3 = document.querySelector("#p3");
  const span = document.querySelector("#span");
  const p = document.querySelector("#p");
  const img = document.querySelector("#img");
  const img1 = document.querySelector(".img_1");
  const img2 = document.querySelector(".img_2");
  const img3 = document.querySelector(".img_3");

  console.log(p,img)

  const listDetails = document.querySelector(".list-details");
  let flag = 0 ;//0是隐藏，1是显示。


  list1.onclick = function(){
    if(flag === 0){
      listDetails.style.display = "block";
      img1.src = "https://ssl1.sephorastatic.cn/soa/pc/images/category_up_arrow_b.png";
      flag = 1;//修改状态
    }else{
      listDetails.style.display = "none";
      img1.src = "https://ssl1.sephorastatic.cn/soa/pc/images/category_down_arrow_n.png";
      flag = 0;//修改状态
    }
    listDetails.style.top = "80px";
    p.innerHTML = p1.innerHTML;
    img.src = "https://ssl1.sephorastatic.cn/products/4/5/2/6/0/4/1_n_07438_150x150.jpg";
  }
  list2.onclick = function(){
    if(flag === 0){
      listDetails.style.display = "block";
      img2.src = "https://ssl1.sephorastatic.cn/soa/pc/images/category_up_arrow_b.png";
      flag = 1;//修改状态
    }else{
      listDetails.style.display = "none";
      img2.src = "https://ssl1.sephorastatic.cn/soa/pc/images/category_down_arrow_n.png";
      flag = 0;//修改状态
    }
    listDetails.style.top = "140px";
    p.innerHTML = p2.innerHTML;

    img.src = "https://ssl1.sephorastatic.cn/products/5/4/7/3/0/0/1_n_14038_180x180.jpg";
  }
  list3.onclick = function(){
    if(flag === 0){
      listDetails.style.display = "block";
      img3.src = "https://ssl1.sephorastatic.cn/soa/pc/images/category_up_arrow_b.png";
      flag = 1;//修改状态
    }else{
      listDetails.style.display = "none";
      img3.src = "https://ssl1.sephorastatic.cn/soa/pc/images/category_down_arrow_n.png";
      flag = 0;//修改状态
    }
    listDetails.style.top = "180px";
    p.innerHTML = p3.innerHTML;
    img.src = "https://ssl2.sephorastatic.cn/products/V/S/1/0/3/5/6/4/5/1_n_14731_180x180.jpg";
  }






    function SmallToBig(){
        this.mBox = document.querySelector(".middleBox");
        this.mImg = document.querySelector(".middleBox img");
        this.mSpan = document.querySelector(".middleBox span");
        this.bBox = document.querySelector(".bigBox");
        this.bImg = document.querySelector(".bigBox img");
        // console.log(this.mBox)
        this.imgs = document.querySelectorAll(".list img");
        this.index = 0;
        this.imgArr = [{
            large:"https://ssl3.sephorastatic.cn/products/V/S/1/0/3/6/6/9/9/1_n_14937_1200x1200.jpg",
            middle:"https://ssl3.sephorastatic.cn/products/V/S/1/0/3/6/6/9/9/1_n_14937_640x640.jpg",
            small:"https://ssl3.sephorastatic.cn/products/V/S/1/0/3/6/6/9/9/1_n_14937_50x50.jpg",
        },{
            large:"https://ssl1.sephorastatic.cn/products/V/S/1/0/3/6/6/9/9/2_n_14937_1200x1200.jpg",
            middle:"https://ssl1.sephorastatic.cn/products/V/S/1/0/3/6/6/9/9/2_n_14937_640x640.jpg",
            small:"./imgs/s1.jpg",////////https://ssl1.sephorastatic.cn/products/V/S/1/0/3/6/6/9/9/2_n_14937_50x50.jpg
        }]

        this.addEvent();
    }
    SmallToBig.prototype.addEvent = function(){
        const that = this;
        this.mBox.addEventListener("mouseover", function(){
            that.show()
        })
        this.mBox.addEventListener("mouseout", function(){
            that.hide()
        })
        this.mBox.addEventListener("mousemove", function(){
            that.move()
        })
        
        this.imgs.forEach((val,idx)=>{
            val.onclick = function(){
                that.imgs[that.index].className = "";
                this.className = "active";
                that.bImg.src = that.imgArr[idx].large;
                that.mImg.src = that.imgArr[idx].middle;
                that.index = idx;
            }
        })
    }
    SmallToBig.prototype.show = function(){
        this.mSpan.style.display = "block";
        this.bBox.style.display = "block";
        this.getSize();
        this.mSpan.style.width = this.bBoxW / this.bImgW * this.mBoxW + "px";
        this.mSpan.style.height = this.bBoxH / this.bImgH * this.mBoxH + "px";
    }
    SmallToBig.prototype.getSize = function(){
        this.bBoxW = this.bBox.offsetWidth;
        this.bBoxH = this.bBox.offsetHeight;
        this.bImgW = this.bImg.offsetWidth;
        this.bImgH = this.bImg.offsetHeight;
        this.mBoxW = this.mBox.offsetWidth;
        this.mBoxH = this.mBox.offsetHeight;
    }
    SmallToBig.prototype.hide = function(){
        this.mSpan.style.display = "none";
        this.bBox.style.display = "none";
    }
    SmallToBig.prototype.move = function(eve){
        const e = eve || window.event;
        let l = e.offsetX - this.mSpan.offsetWidth/2;
        let t = e.offsetY - this.mSpan.offsetHeight/2;
        if(l<0) l=0;
        if(t<0) t=0;
        if(l>this.mBoxW-this.mSpan.offsetWidth){
            l=this.mBoxW-this.mSpan.offsetWidth;
        }
        if(t>this.mBoxH-this.mSpan.offsetHeight){
            t=this.mBoxH-this.mSpan.offsetHeight;
        }
        this.mSpan.style.left = l + "px";
        this.mSpan.style.top = t + "px";
        const x = l / (this.mBoxW-this.mSpan.offsetWidth);
        const y = t / (this.mBoxH-this.mSpan.offsetHeight);
        this.bImg.style.left = - x * (this.bImgW-this.bBoxW) + "px";
        this.bImg.style.top = - y * (this.bImgH-this.bBoxH) + "px";
      }
    new SmallToBig();


      function NumberChange(){
       this.obtn1 = document.querySelector(".btn1");
       this.obtn2 = document.querySelector(".btn2");
       this.num = document.querySelector(".number")
       console.log(this.obtn1)
       console.log(this.obtn2)
       console.log(this.num)

        this.addEvent()
      }
      NumberChange.prototype.addEvent = function(){
        const that = this;
        this.obtn1.addEventListener("click",function(){
          that.add();
        })
        this.obtn2.addEventListener("click",function(){
          that.reduce();
        })
      }                   
      NumberChange.prototype.add = function(){
        this.num.innerHTML === "5" ? this.num.innerHTML = "5" : this.num.innerHTML++;
      }
      NumberChange.prototype.reduce = function(){
        this.num.innerHTML === "1" ? this.num.innerHTML = "1" : this.num.innerHTML--;
      }
     new NumberChange()
</script>
<script src="./js/公共头尾部.js"></script>
</html>